package org.jeecg.modules.demo.soQualityOrder.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jetbrains.annotations.NotNull;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: so_quality_order
 * @Author: jeecg-boot
 * @Date:   2021-12-10
 * @Version: V1.0
 */
@Data
@TableName("so_quality_order")
@ApiModel(value="so_quality_order对象", description="so_quality_order")
public class SoQualityOrder implements Serializable ,Comparable<SoQualityOrder> {
    private static final long serialVersionUID = 1L;

	/**主键ID*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键ID")
    private String id;
	/**质检单编号*/
	@Excel(name = "质检单编号", width = 15)
    @ApiModelProperty(value = "质检单编号")
    private String qoNum;
	/**合同编号*/
	@Excel(name = "合同编号", width = 15)
    @ApiModelProperty(value = "合同编号")
    private String puConNo;
	/**销售订单号*/
	@Excel(name = "销售订单号", width = 15)
    @ApiModelProperty(value = "销售订单号")
    private String soOrder;
	/**仓库编码*/
	@Excel(name = "仓库编码", width = 15)
    @ApiModelProperty(value = "仓库编码")
    @Dict(dicCode ="store_house")
    private String whNum;
	/**出库单号*/
    @ApiModelProperty(value = "出库单号")
    private String sodNo;
	/**质检单类型*/
	@Excel(name = "质检单类型", width = 15)
    @ApiModelProperty(value = "质检单类型")
    private Integer qoType;
	/**质检数量*/
	@Excel(name = "质检数量", width = 15)
    @ApiModelProperty(value = "质检数量")
    private BigDecimal qoQuantity;
	/**单价*/
	@Excel(name = "单价", width = 15)
    @ApiModelProperty(value = "单价")
    private BigDecimal qoPic;
	/**发热量*/
	@Excel(name = "发热量", width = 15)
    @ApiModelProperty(value = "发热量")
    private BigDecimal qoCal;
	/**总价*/
	@Excel(name = "总价", width = 15)
    @ApiModelProperty(value = "总价")
    private BigDecimal qoTotal;
	/**税率*/
	@Excel(name = "税率", width = 15)
    @ApiModelProperty(value = "税率")
    @Dict(dicCode = "tax_rate")
    private BigDecimal qoTaxrate;
	/**不含税价*/
	@Excel(name = "不含税价", width = 15)
    @ApiModelProperty(value = "不含税价")
    private BigDecimal qoNotax;
	/**税额*/
	@Excel(name = "税额", width = 15)
    @ApiModelProperty(value = "税额")
    private BigDecimal qoTax;
	/**制单日期*/
	@Excel(name = "制单日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "制单日期")
    private Date qoDate;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
	/**订单状态（0：未审，1：已审，2：已关闭）*/
	@Excel(name = "订单状态（0：未审，1：已审，2：已关闭）", width = 15)
    @ApiModelProperty(value = "订单状态（0：未审，1：已审，2：已关闭）")
    private Integer soStatus;
	/**删除状态（0：正常，1：已删）*/
	@Excel(name = "删除状态（0：正常，1：已删）", width = 15)
    @ApiModelProperty(value = "删除状态（0：正常，1：已删）")
    private Integer isDelete;
	/**是否生成结算单（0：未生成，1：已生成）*/
	@Excel(name = "是否生成结算单（0：未生成，1：已生成）", width = 15)
    @ApiModelProperty(value = "是否生成结算单（0：未生成，1：已生成）")
    private Integer chuku;

    /**客户*/
    @Excel(name = "客户", width = 15)
    @ApiModelProperty(value = "客户")
    private String soCustom;
    /**质检单位*/
    @Excel(name = "质检单位", width = 15)
    @ApiModelProperty(value = "质检单位")
    private String zjDept;
    /**规格指标*/
    @Excel(name = "规格指标", width = 15)
    @ApiModelProperty(value = "规格指标")
    private String target;
    /**出库数量*/
    @Excel(name = "出库数量", width = 15)
    @ApiModelProperty(value = "出库数量")
    private BigDecimal ckNum;
    /**采样地点*/
    @Excel(name = "采样地点", width = 15)
    @ApiModelProperty(value = "采样地点")
    private String cyAddress;
    /**货物名称*/
    @Excel(name = "货物名称", width = 15)
    @ApiModelProperty(value = "货物名称")
    private String prdNo;
    /**灰分	*/
    @Excel(name = "灰分", width = 15)
    @ApiModelProperty(value = "灰分")
    private BigDecimal hfNum;
    /**挥发份*/
    @Excel(name = "挥发份", width = 15)
    @ApiModelProperty(value = "挥发份")
    private BigDecimal hffNum;
    /**水份*/
    @Excel(name = "水份", width = 15)
    @ApiModelProperty(value = "水份")
    private BigDecimal sfNum;
    /**硫份*/
    @Excel(name = "硫份", width = 15)
    @ApiModelProperty(value = "硫份")
    private BigDecimal lfNum;
//    /**备份*/
//    @Excel(name = "备份", width = 15)
//    @ApiModelProperty(value = "备份")
//    private String mark;
    /**剩余*/
    @Excel(name = "剩余", width = 15)
    @ApiModelProperty(value = "剩余")
    private BigDecimal supsttelemnt;
    /**审核人*/
    @Excel(name = "审核人", width = 15)
    @ApiModelProperty(value = "审核人")
    @Dict(dictTable = "sys_user",dicCode ="id",dicText="realname")
    private String shName;
    /**审核时间*/
    @Excel(name = "审核时间", width = 15)
    @ApiModelProperty(value = "审核时间")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Date shTime;
    /**备注*/
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
    /**质量指标JSON*/
    @Excel(name = "质量指标JSON", width = 15)
    @ApiModelProperty(value = "质量指标JSON")
    private String zhilzbjson;
    /**真实指标*/
    @Excel(name = "真实指标", width = 15)
    @ApiModelProperty(value = "真实指标")
    private String realzb;
    /**附件*/
    @Excel(name = "附件", width = 15)
    @ApiModelProperty(value = "附件")
    private String accessory;
    /**项目*/
    @Excel(name = "项目", width = 15)
    @ApiModelProperty(value = "项目")
    private String project;
    /**部门*/
    @Excel(name = "部门", width = 15)
    @ApiModelProperty(value = "部门")
    @Dict(dictTable = "sys_depart",dicCode ="id",dicText="depart_name")
    private String dept;
    /**无税单价*/
    @Excel(name = "无税单价", width = 15)
    @ApiModelProperty(value = "无税单价")
    private BigDecimal wsdj;
    /**无税金额*/
    @Excel(name = "无税金额", width = 15)
    @ApiModelProperty(value = "无税金额")
    private BigDecimal wsje;
    /**含税单价*/
    @Excel(name = "含税单价", width = 15)
    @ApiModelProperty(value = "含税单价")
    private BigDecimal hsdj;
    /**含税金额*/
    @Excel(name = "含税金额", width = 15)
    @ApiModelProperty(value = "含税金额")
    private BigDecimal hsje;
    /**税率*/
    @Excel(name = "税率", width = 15)
    @ApiModelProperty(value = "税率")
    @Dict(dicCode = "tax_rate")
    private BigDecimal sl;
    /**计量单位*/
    @Excel(name = "计量单位", width = 15)
    @ApiModelProperty(value = "计量单位")
    private String jldw;
    /**是否审核过*/
    @Excel(name = "是否审核过", width = 15)
    @ApiModelProperty(value = "是否审核过")
    private String isShjl;
    /**租户id*/
    @Excel(name = "租户id", width = 15)
    @ApiModelProperty(value = "租户id")
    private Integer tenantId;
    /**剩余金额*/
    @Excel(name = "剩余金额", width = 15)
    @ApiModelProperty(value = "剩余金额")
    private BigDecimal syJine;
    /**剩余质检数量*/
    @Excel(name = "剩余质检数量", width = 15)
    @ApiModelProperty(value = "剩余质检数量")
    private BigDecimal syNum;
    /**业务员*/
    @Excel(name = "业务员", width = 15)
    @ApiModelProperty(value = "业务员")
    @Dict(dictTable = "sys_user",dicCode ="id",dicText="realname")
    private String sosStaff;
    /**内部编号*/
    @Excel(name = "内部编号", width = 15)
    @ApiModelProperty(value = "内部编号")
    private String tradecode;
    /**质检转移单*/
    @Excel(name = "质检转移单", width = 15)
    @ApiModelProperty(value = "质检转移单")
    private String zjzyd;
    /**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**机构编码*/
    @ApiModelProperty(value = "机构编码")
    private String sysOrgCode;


    @Override
    public int compareTo(@NotNull SoQualityOrder o) {
        return o.getCreateTime().compareTo(this.createTime);
    }
}
